package com.zzf.观察者模式3;

import java.util.Observable;
import java.util.Observer;

public class Customer implements Observer {

    @Override
    public void update(Observable o, Object arg) {
        int var = (Integer)arg;
        if (var > 0){
            System.out.println("消费者：涨价了，难过");
        }else {
            System.out.println("消费者：降价，高兴");
        }
    }
}
